package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ConsumptionBillMapper;
import com.ruoyi.system.domain.ConsumptionBill;
import com.ruoyi.system.service.IConsumptionBillService;

/**
 * 房间消费账单Service业务层处理
 * 
 * @author txy
 * @date 2022-02-11
 */
@Service
public class ConsumptionBillServiceImpl implements IConsumptionBillService 
{
    @Autowired
    private ConsumptionBillMapper consumptionBillMapper;

    /**
     * 查询房间消费账单
     * 
     * @param consumptionId 房间消费账单主键
     * @return 房间消费账单
     */
    @Override
    public ConsumptionBill selectConsumptionBillByConsumptionId(Long consumptionId)
    {
        return consumptionBillMapper.selectConsumptionBillByConsumptionId(consumptionId);
    }

    /**
     * 查询房间消费账单列表
     * 
     * @param consumptionBill 房间消费账单
     * @return 房间消费账单
     */
    @Override
    public List<ConsumptionBill> selectConsumptionBillList(ConsumptionBill consumptionBill)
    {
        return consumptionBillMapper.selectConsumptionBillList(consumptionBill);
    }

    /**
     * 新增房间消费账单
     * 
     * @param consumptionBill 房间消费账单
     * @return 结果
     */
    @Override
    public int insertConsumptionBill(ConsumptionBill consumptionBill)
    {
        return consumptionBillMapper.insertConsumptionBill(consumptionBill);
    }

    /**
     * 修改房间消费账单
     * 
     * @param consumptionBill 房间消费账单
     * @return 结果
     */
    @Override
    public int updateConsumptionBill(ConsumptionBill consumptionBill)
    {
        return consumptionBillMapper.updateConsumptionBill(consumptionBill);
    }

    /**
     * 批量删除房间消费账单
     * 
     * @param consumptionIds 需要删除的房间消费账单主键
     * @return 结果
     */
    @Override
    public int deleteConsumptionBillByConsumptionIds(Long[] consumptionIds)
    {
        return consumptionBillMapper.deleteConsumptionBillByConsumptionIds(consumptionIds);
    }

    /**
     * 删除房间消费账单信息
     * 
     * @param consumptionId 房间消费账单主键
     * @return 结果
     */
    @Override
    public int deleteConsumptionBillByConsumptionId(Long consumptionId)
    {
        return consumptionBillMapper.deleteConsumptionBillByConsumptionId(consumptionId);
    }
}
